SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		Michelangelo
-- este procedimiento consulta la lista de 
--prelaciones de por la materia de un pensum
-- =============================================
CREATE PROCEDURE sp_prelacion_materia 
	@id_Materia		int,
	@id_pensum      int 
AS
BEGIN
	select m.id_Materia, m.nombreMateria 
	from Materia m, Prelacion pp
	where
	pp.fk_pensum = @id_pensum
	and pp.fk_materia_Actual =@id_Materia
	and pp.fk_materia_prelacion = m.id_Materia
END
GO
